home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 2856 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: fwi.uva.nl!not-for-mail
  2. From: roode@fwi.uva.nl (Erik van Roode)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Q: 3D Vector Rotation
  5. Date: 6 Feb 1996 11:50:32 +0100
  6. Organization: FWI, University of Amsterdam
  7. Distribution: world
  8. Message-ID: <4f7bpo$r0i@carol.fwi.uva.nl>
  9. References: <4f41fb$om@mandolin.qnet.com>
  10. NNTP-Posting-Host: carol.fwi.uva.nl
  11.  
  12. mlantz@qnet.com (Mike Lantz) writes:
  13.  
  14. >Okay, here's the deal.  I am using C and just doing some standard 3d 
  15. >rotations with shading and a starfield, nothing big.  Anyway, what I want 
  16. >to do is pull back and put the entire screen into a cube and rotate it as 
  17. >the other rotations within it are continuing.  Anyway, I figure I need to 
  18. >create another coordinate system, but I can't figure out how to code it.  
  19. >Any suggestions?
  20.  
  21. You can use matrices to do things as rotation, coordinate mapping etc etc.
  22. Converting 'world coordinates' to 'display coordinates' is then just
  23. a matter of multiplying matrices. I needed to do that for a course in
  24. computer graphics, and it worked nicely. More detailed information should
  25. be obtainable from any good book on computer graphics.
  26.  
  27. For stuff like rotation within rotation:
  28. Object A rotates within Object B which rotates withing world C.
  29.  
  30. Matrix for translating coordinates A to B, B to C. This may get very slow
  31. though :) Anyway, if you think this could be useful, I can look up some
  32. things.
  33.  
  34. Erik
  35.  
  36. -- 
  37.  Erik van Roode                 Q : Did you ever use MSDOS ?
  38.  University of Amsterdam        A : Yes, but I did not inhale !
  39.  Dept. of Computer Science
  40.  Email: roode@fwi.uva.nl
  41.